What is a DD module ?
----------------------

  It is simply a DLL file which has a renamed extension (.mod)


What are the functions to be exported?
----------------------------------------
  'OnGetModuleInfo' 
  'OnInit'
  'OnClose'
  'OnShow'
  'BeforeChannelChange'
  'AfterChannelChange'
  'OnDDEvent'

	All these functions must be defined as stdcall.

	int __stdcall OnGetModuleInfo (TModuleInfo *pModuleInfo)  
	int __stdcall OnInit (TInitInfo *pInitInfo)
	int __stdcall OnClose ()
	int __stdcall OnShow ()
	int __stdcall BeforeChannelChange (TChannelInfo *pChannelInfo)
	int __stdcall AfterChannelChange (TChannelInfo *pChannelInfo)
	int __stdcall OnDDEvent(DWORD EventType, void *EventParams)

	Functions should just return 0 in most of cases (SUCCESS)


How can I send a command to DD?
----------------------------------
This is done by sending window messages to DD's main window.

	msg = WM_MODULE_MSG    (WM_USER + 321)

	wParam = Function Code
	lParam = Function Parameters

	Function codes always begins with prefix DDMODAPI_

	e.g.
          SendMessage(hwndDD, WM_MODULE_MSG,  DDMODAPI_START_RECORD, 0);
          SendMessage(hwndDD, WM_MODULE_MSG,  DDMODAPI_STOP_FILTER, dwFilterHandle);


How can I get informed in a module about the things going on DD?
-----------------------------------------------------------------
There are three types of event functions called by DD. 

  'BeforeChannelChange'
  'AfterChannelChange'
  'OnDDEvent'


	OnDDEvent handles various things like
		DDEVENT_AFTER_RESIZE
		DDEVENT_ON_START_RECORD
		DDEVENT_ON_KEYBOARD
		DDEVENT_ON_REMOTE
		DDEVENT_ON_DEVICE_RESTART
		etc.

	All events take DDEVENT_ prefix 



* Please ask on the dvbdream.org/forum for undocumented details *